<template>
    <div class="all">
        <div style="margin-left: 10px;">
            <i class="el-icon-s-management"></i><span> 授课查询</span>
        </div>
        <el-card>
            <el-table :data="tableData" style="width: 100%" v-loading="loading">
                <el-table-column prop="id" label="课程id">
                </el-table-column>
                <el-table-column prop="name" label="课程名">
                </el-table-column>
                <el-table-column prop="grade" label="年级">
                </el-table-column>
                <el-table-column prop="credit" label="学分">
                </el-table-column>
                <el-table-column prop="time" label="上课时间">
                </el-table-column>
                <el-table-column prop="location" label="上课地点">
                </el-table-column>
                <el-table-column prop="selectedCount" label="选课人数">
                </el-table-column>

            </el-table>
        </el-card>
        
    </div>
</template>

<script>
import { teacherlsit } from '@/api/teacher/search';
export default {

    data() {
        return {
            tableData: [],
            loading: false,
        }
    },
    methods: {
        getlist() {
            this.loading = true
            teacherlsit().then(res => {
                this.loading = false
                this.tableData = res.data
            })
        },


    },
    mounted() {
        this.getlist()

    }
}
</script>

<style lang="scss" scoped>
.all {
    background-color: #ccc;
    height: 100%;
    width: 100%;

    .el-card {

        width: 98%;
        margin: 5px auto 0;

        .header {
            display: flex;
            justify-content: space-between;
        }
    }
}
</style>